-
Notifications
You must be signed in to change notification settings - Fork 21.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(FIX) Error for array of integers for postgres #10340
Conversation
Field description in schema: `t.integer :field_name, :type => :array`. Error: "undefined method `gsub' for 1:Fixnum" in PostgreSQLColumn#quote_and_escape.
We'll need a test to this |
@Slike9 ping, what is the status of this PR? Can you add a test-case? |
test fails (PostgresqlArrayTest#test_multi_dimensional) |
Getting this error on v4.0.0.beta1 too |
@Numerico on 4.0.0 too? |
that's right. (or you mean to test it against 4.0.0 instead of 4.0.0.beta1?) i finally by-passed it having an array of strings instead of integers, but I suppose it should work for ints, shouldn't it? |
I can confirm this is a problem and the pull request fixes it, so I am unsure why this has been closed. Can someone @Slike9 or @rafaelfranca re-open the issue? |
@hubertlepicki can you describe what problem you ran into. The PR description says it fixes the issue with |
Tell you what, I'll make a separate pull request as this is, indeed similar, but slight different issue than described at least in the description here. |
This issue stops me from upgrading one of the apps to Rails 4. Fix in #11245 seems to resolve the issue. Just wanted to give heads up. |
Also run into this issue in Rails 4.0.0. On a side note, Changing the field to be of type string instead of integer also resolved the problem. |
Field description in schema:
t.integer :field_name, :type => :array
.Error: "undefined method `gsub' for 1:Fixnum" in PostgreSQLColumn#quote_and_escape.